package com.yswy.domain.entity.tf;

import com.baomidou.mybatisplus.annotation.TableName;
import com.yswy.domain.common.BasePojo;
import com.yswy.domain.entity.user.User;
import com.yswy.domain.vo.gld.addOrUpate.DomainAddOrUpdate;
import com.yswy.domain.vo.gld.addOrUpate.TgMediaAccountAddOrUpdate;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@Builder
@AllArgsConstructor
@Api(tags = "投放账户")
@TableName(value = "tg_media_account")
public class TgMediaAccount  extends BasePojo<TgMediaAccount> {

    @ApiModelProperty("投放（上架）平台  0 巨量  1 快手 ")
    private String tfPlatform;
    @ApiModelProperty("登录账号")
    private String loginAccount;
    @ApiModelProperty("子账户名称")
    private String accountName;
    @ApiModelProperty("子账户号")
    private String accountNum;
    @ApiModelProperty("备注")
    private String remarks;
    public TgMediaAccount(TgMediaAccountAddOrUpdate res, User user){
        this.tfPlatform =res.getTfPlatform();
        this.loginAccount =res.getLoginAccount();
        this.accountName =res.getAccountName();
        this.accountNum =res.getAccountNum();
        this.remarks =res.getRemarks();
        super.setCreateBy(user.getId().longValue());
    }
    public TgMediaAccount(){

    }
}
